package com.birdboot.core;

import com.birdboot.http.HttpServletRequest;

import java.io.IOException;
import java.io.InputStream;
import java.net.Socket;
import java.util.HashMap;
import java.util.Map;

public class ClientHandler implements Runnable{
    private Socket socket;
    public ClientHandler(Socket socket){
        this.socket=socket;
    }
    public void run(){
        try {
            //1 解析请求
            //V4:将解析请求的细节移动到request构造器中进行
            HttpServletRequest request=new HttpServletRequest(socket);
            String path=request.getUri();
            System.out.println(path);
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
    //通过socket获取的输入流读取客户端发过来的一行字符串

}
